package com.archive.manage.service.impl;

import java.util.List;
import com.archive.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.archive.manage.mapper.SkillCertificateMapper;
import com.archive.manage.domain.SkillCertificate;
import com.archive.manage.service.ISkillCertificateService;

/**
 * 简历技能证书信息Service业务层处理
 * 
 * @author marioduan
 * @date 2025-05-02
 */
@Service
public class SkillCertificateServiceImpl implements ISkillCertificateService 
{
    @Autowired
    private SkillCertificateMapper skillCertificateMapper;

    /**
     * 查询简历技能证书信息
     * 
     * @param id 简历技能证书信息主键
     * @return 简历技能证书信息
     */
    @Override
    public SkillCertificate selectSkillCertificateById(Long id)
    {
        return skillCertificateMapper.selectSkillCertificateById(id);
    }

    /**
     * 查询简历技能证书信息列表
     * 
     * @param skillCertificate 简历技能证书信息
     * @return 简历技能证书信息
     */
    @Override
    public List<SkillCertificate> selectSkillCertificateList(SkillCertificate skillCertificate)
    {
        return skillCertificateMapper.selectSkillCertificateList(skillCertificate);
    }

    /**
     * 新增简历技能证书信息
     *
     * @param resumeId 简历技能证书信息
     * @param skillCertificateName 简历技能证书名称
     * @return 结果
     */
    @Override
    public int insertSkillCertificate(String studentId,String[] skillCertificateName)
    {
        return skillCertificateMapper.insertSkillCertificate(studentId,skillCertificateName);
    }

    /**
     * 修改简历技能证书信息
     * 
     * @param skillCertificate 简历技能证书信息
     * @return 结果
     */
    @Override
    public int updateSkillCertificate(SkillCertificate skillCertificate)
    {
        skillCertificate.setUpdateTime(DateUtils.getNowDate());
        return skillCertificateMapper.updateSkillCertificate(skillCertificate);
    }

    /**
     * 批量删除简历技能证书信息
     * 
     * @param ids 需要删除的简历技能证书信息主键
     * @return 结果
     */
    @Override
    public int deleteSkillCertificateByIds(Long[] ids)
    {
        return skillCertificateMapper.deleteSkillCertificateByIds(ids);
    }

    /**
     * 删除简历技能证书信息信息
     * 
     * @param id 简历技能证书信息主键
     * @return 结果
     */
    @Override
    public int deleteSkillCertificateById(Long id)
    {
        return skillCertificateMapper.deleteSkillCertificateById(id);
    }

    /**
     * 根据学号获取简历技能证书
     *
     * @param studentId 学号
     * @return 结果
     */
    @Override
    public String[] selectSkillCertificateByStudentId(String studentId) {
        return skillCertificateMapper.selectSkillCertificateNameByStudentId(studentId);
    }

    /**
     * 根据学号删除简历技能证书
     *
     * @param studentId 学号
     * @return 结果
     */
    @Override
    public int deleteSkillCertificateByStudentId(String studentId) {
        return skillCertificateMapper.deleteSkillCertificateByStudentId(studentId);
    }

    /**
     * 批量根据学号删除简历技能证书
     *
     * @param studentIds 学号ids
     * @return 结果
     */
    @Override
    public int deleteSkillCertificateByStudentIds(String[] studentIds) {
        return skillCertificateMapper.deleteSkillCertificateByStudentIds(studentIds);
    }
}
